package com.example.address_model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 地址管理
 * </p>
 *
 * @author sjz
 * @since 2024-07-10
 */
@Getter
@Setter
@TableName("tb_address_book")
@Schema(name = "AddressBook对象", description = "地址管理")
public class AddressBook implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId("id")
    private String id;

    @Schema(description = "用户id")
    @TableField("user_id")
    private String userId;

    @Schema(description = "收货人")
    @TableField("consignee")
    private String consignee;

    @Schema(description = "性别 0 女 1 男")
    @TableField("gender")
    private String gender;

    @Schema(description = "手机号")
    @TableField("phone")
    private String phone;

    @Schema(description = "省级区划编号")
    @TableField("province_code")
    private String provinceCode;

    @Schema(description = "省级名称")
    @TableField("province_name")
    private String provinceName;

    @Schema(description = "市级区划编号")
    @TableField("city_code")
    private String cityCode;

    @Schema(description = "市级名称")
    @TableField("city_name")
    private String cityName;

    @Schema(description = "区级区划编号")
    @TableField("district_code")
    private String districtCode;

    @Schema(description = "区级名称")
    @TableField("district_name")
    private String districtName;

    @Schema(description = "详细地址")
    @TableField("detail")
    private String detail;

    @Schema(description = "标签")
    @TableField("label")
    private String label;

    @Schema(description = "默认 0 否 1是")
    @TableField("is_default")
    private Integer isDefault;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(description = "创建人")
    @TableField(value = "create_user")
    private String createUser;

    @Schema(description = "修改人")
    @TableField(value = "update_user")
    private String updateUser;

    @Schema(description = "是否删除")
    @TableField("is_deleted")
    private Integer isDeleted;
}
